Semiconductor device

ABSTRACT

According to one embodiment, a semiconductor device includes a first switch element including a first end to which a first voltage is applied, and a second end and a gate electrically coupled to a first node, a second switch element including a first end to which a second voltage is applied, and a second end and a gate electrically coupled to the first node, a third switch element including a first end to which the second voltage is applied, a second end electrically coupled to a second node, and a gate coupled to the first node, a fourth switch element including a gate coupled to the second node, and a first terminal electrically coupled to a first end of the fourth switch element and outputting a signal based on a voltage of the second node.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromJapanese Patent Application No. 2021-131590, filed Aug. 12, 2021, theentire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a semiconductor device.

BACKGROUND

A semiconductor device for comparing heights of two voltages andoutputting a signal based on a result of the comparison is known.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to an embodiment.

FIG. 2 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a first modification.

FIG. 3 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a second modification.

FIG. 4 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a third modification.

FIG. 5 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a fourth modification.

FIG. 6 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a fifth modification.

FIG. 7 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a sixth modification.

FIG. 8 is a circuit diagram explaining an example of a configuration ofa semiconductor device according to a seventh modification.

DETAILED DESCRIPTION

In general, according to one embodiment, a semiconductor device includesa first switch element including a first end to which a first voltage isapplied, and a second end and a gate electrically coupled to a firstnode, a second switch element including a first end to which a secondvoltage is applied, and a second end and a gate electrically coupled tothe first node, a third switch element including a first end to whichthe second voltage is applied, a second end electrically coupled to asecond node, and a gate coupled to the first node, a first currentsource electrically coupled to the first node, a first elementelectrically coupled to the second node, a fourth switch elementincluding a gate coupled to the second node, and a first terminalelectrically coupled to a first end of the fourth switch element andoutputting a signal based on a voltage of the second node.

Hereinafter, an embodiment will be described with reference to thedrawings. In the descriptions below, constituent elements having thesame functions and configurations will be denoted by common referencesigns.

1. Embodiment

A semiconductor device according to an embodiment will be described.

1.1 Configuration

A configuration of the semiconductor device according to the embodimentwill be described.

1.1.1 Overall Configuration of Semiconductor Device

The configuration of the semiconductor device according to theembodiment will be described with reference to FIG. 1 . FIG. 1 is acircuit diagram explaining an example of the configuration of thesemiconductor device according to the embodiment.

A semiconductor device 1 is, for example, an IC (Integrated Circuit)chip. The semiconductor device 1 includes a current source 10 and acomparing part 11. The current source 10 and the comparing part 11 areprovided on a top surface of one substrate. In addition, thesemiconductor device 1 includes terminals PVDD, PV1, PV2, and POUT.Voltages VDD, V1, and V2 are applied to the terminals PVDD, PV1, andPV2, respectively, from an external power supply (not shown) of thesemiconductor device 1. From the terminal POUT, a signal S is output toa load 2 provided outside the semiconductor device 1. The voltage VDD isa voltage used to drive the semiconductor device 1. The voltages V1 andV2 are voltages to be compared in the semiconductor device 1. The signalS is a signal based on a comparison result of the voltages V1 and V2.

The comparing part 11 is a circuit that compares the heights of thevoltages V1 and V2.

The current source 10 is a circuit that supplies an electric currentbased on the voltage VDD to the comparing part 11.

1.1.2 Configuration of Circuit of Semiconductor Device

Configurations of the circuits of the semiconductor device 1 accordingto the embodiment will be described with reference to FIG. 1 again.

1.1.2.1 Current Source

First, a configuration of the circuit of the current source 10 will bedescribed.

The current source 10 includes switch elements Qs1 and Qs2, and aresistor Rs1. The switch element Qs1 is a P-channel type MOSFET(Metal-Oxide-Semiconductor Field Effect Transistor). The switch elementQs2 is an N-channel type MOSFET.

The voltage VDD is applied to the source of the switch element Qs1 viathe terminal PVDD. The drain and gate of the switch element Qs1 arecoupled to a node N1. An electric current based on the voltage VDD flowsthrough the switch element Qs1.

A first end of the resistor Rs1 is coupled to the node N1. A second endof the resistor Rs1 is coupled to a node N2.

The drain and gate of the switch element Qs2 are coupled to the node N2.The source of the switch element Qs2 is grounded. An electric currentflowing through the switch element Qs1 is supplied to the switch elementQs2 via the resistor Rs1. That is, an electric current flowing throughthe switch element Qs2 is based on the voltage VDD.

1.1.2.2 Comparing Part

Next, a configuration of the comparing part 11 according to theembodiment will be described.

The comparing part 11 includes switch elements Q1, Q2, Q3, Q4, Q5, andQ6, a resistor R1, and diodes D1 and D2. The switch elements Q1, Q2, Q4,and Q5 are P-channel type MOSFETs. The switch elements Q3 and Q6 areN-channel type MOSFETs.

The voltage V1 is applied to the source of the switch element Q1 via theterminal PV1. The drain and gate of the switch element Q1 are coupled incommon to the diode D1. That is, the diode-coupled switch element Q1 isprovided between the terminal PV1 and the diode D1. Thus, the switchelement Q1 operates in a saturation region, and an electric current I1flows through the switch element Q1.

The anode of the diode D1 is coupled to the drain and gate of the switchelement Q1. The cathode of the diode D1 is coupled to a node N3.

The voltage V2 is applied to the source of the switch element Q2 via theterminal PV2. The drain and gate of the switch element Q2 are coupled incommon to a node N4. That is, the diode-coupled switch element Q2 isprovided between the terminal PV2 and the node N4. Thus, the switchelement Q2 operates in a saturation region, and an electric current T2flows through the switch element Q2. A gate length, a channel width, anda current-voltage characteristic of the switch element Q2 are equivalentto those of the switch element Q1.

The anode of the diode D2 is coupled to the node N4. The cathode of thediode D2 is coupled to the node N3. A current-voltage characteristic ofthe diode D2 is equivalent to that of the diode D1.

The switch element Q3 forms a current mirror circuit with the switchelement Qs2 of the current source 10. The drain of the switch element Q3is coupled to the node N3. The source of the switch element Q3 isgrounded. The gate of the switch element Q3 is coupled to the currentsource 10 via the node N2. A constant current IS flows through theswitch element Q3, with the operation of the current source 10. Theconstant current IS is a sum of the electric currents I1 and I2.

The switch element Q4 forms a current mirror circuit with the switchelement Q2. That is, the source of the switch element Q4 is coupled tothe terminal PV2. The drain of the switch element Q4 is coupled to anode N5. The gate of the switch element Q4 is coupled to the node N4. Anelectric current IM flows through the switch element Q4. Herein, a gatelength, a channel width, and a current-voltage characteristic of theswitch element Q4 are equivalent to those of the switch element Q2.Thereby, the electric current IM is a mirror current of the electriccurrent I2.

The switch element Q5 forms a current mirror circuit with the switchelement Qs1 of the current source 10. That is, the voltage VDD isapplied to the source of the switch element Q5 via the terminal PVDD.The drain of the switch element Q5 is coupled to the terminal POUT. Thegate of the switch element Q5 is coupled to the current source 10 viathe node N1. A constant current flows through the switch element Q5,with the operation of the current source 10.

The drain of the switch element Q6 is coupled to the terminal POUT. Thesource of the switch element Q6 is grounded. The gate of the switchelement Q6 is coupled to the node N5. A threshold voltage of the switchelement Q6 is equivalent to a voltage of the node N5 in a case where theelectric current IM is equal to a half of the constant current IS. Thatis, in a case where the electric current IM is equal to or larger than ahalf of the constant current IS, the switch element Q6 is turned on. Inaddition, in a case where the electric current IM is smaller than a halfof the constant current IS, the switch element Q6 is turned off.

A first end of the resistor R1 is coupled to the node N5. A second endof the resistor R1 is grounded.

Note that the constant current IS flowing through the switch element Q3is such that a gate-source voltage of the switch element Q1 in a casewhere the electric current I1 is almost equal to the constant current IS(a case where the electric current I2 rarely flows) is lower than arating voltage RVGS1 of the switch element Q1. In addition, the constantcurrent IS is such that a gate-source voltage of the switch element Q2in a case where the electric current I2 is almost equal to the constantcurrent IS (a case where the electric current I1 rarely flows) is lowerthan a rating voltage RVGS2 of the switch element Q2. The semiconductordevice 1 is formed such that such a constant current IS flows throughthe switch element Q3.

1.2 Operation

An operation using the semiconductor device 1 according to theembodiment will be described.

In the operation using the semiconductor device 1, the voltage VDD isapplied to the terminal PVDD. Thereby, constant currents based on thevoltage VDD respectively flow through the switch elements Q3 and Q5 ofthe comparing part 11.

In addition, the voltages V1 and V2 are applied to the terminals PV1 andPV2, respectively. Thereby, the electric currents I1 and I2 flow throughthe switch elements Q1 and Q2, respectively.

In a case where the voltage V1 is higher than the voltage V2, theelectric current I1 is larger than a half of the constant current IS(IS/2), and the electric current I2 is smaller than a half of theconstant current IS. In addition, in a case where the voltage V1 isequal to or lower than the voltage V2, the electric current I1 is equalto or smaller than a half of the constant current IS, and the electriccurrent I2 is equal to or larger than a half of the constant current IS.

With the operation of the current mirror circuit including the switchelements Q2 and Q4, an electric current IM equal to the electric currentI2 flows through the switch element Q4. That is, in a case where thevoltage V1 is higher than the voltage V2, the electric current IM issmaller than a half of the constant current IS. In addition, in the casewhere the voltage V1 is equal to or lower than the voltage V2, theelectric current IM is equal to or larger than a half of the constantcurrent IS.

As described above, the voltage of the node N5 is formed so as to beequal to the threshold voltage of the switch element Q6 in the casewhere the electric current IM is equal to a half of the constant currentIS. Thereby, in the case where the voltage V1 is higher than the voltageV2, the switch element Q6 is turned off. Thus, the voltage VDD issupplied to the terminal POUT via the switch element Q5, and an“H”-level signal S is output from the terminal POUT. In addition, in thecase where the voltage V1 is equal to or lower than the voltage V2, theswitch element Q6 is turned on. Thus, the terminal POUT is grounded viathe switch element Q6, and an “L”-level signal S is output from theterminal POUT.

1.3 Advantageous Effect of Present Embodiment

According to the embodiment, it is possible to suppress an increase inchip size while suppressing an increase in power consumption. Anadvantageous effect of the embodiment will be described below.

The semiconductor device 1 according to the embodiment includes theswitch element Q1 including the source to which the voltage V1 isapplied and the drain and gate coupled to the node N3, the switchelement Q2 including the source to which the voltage V2 is applied andthe drain and gate coupled to the node N3, and the switch element Q3including the drain coupled to the node N3. With such a configuration,each of the electric currents I1 and I2 can be suppressed to currentsthat are equal to or smaller than the constant current IS. Thus, upperlimit values of the gate-source voltages of the switch elements Q1 andQ2 can be set based on the constant current IS, regardless of theheights of the voltages V1 and V2. Thereby, an increase in thegate-source voltages of the switch elements Q1 and Q2 can be suppressedwithout using a means such as dividing the voltages V1 and V2 using anelement such as a resistor. Accordingly, rather than the case of usingan element such as a resistor, it is possible to suppress an increase inpower consumption as well as an increase in chip size due to increasedelements.

Supplementarily, in a case where a gate-source voltage of a switchelement corresponding to an electric current flowing through the switchelement is not uniquely determined, there is a possibility that theswitch element may be destroyed due to the gate-source voltage of theswitch element exceeding a rating voltage thereof. As one technique foravoiding such an event, for example, a technique of reducing a voltageto be applied to a switch element by providing an element such as aresistor for dividing a voltage to be applied to the gate or source ofthe switch element is known. However, according to that technique, thereis a possibility that power consumption and a chip size of asemiconductor device may increase due to an increase in the number ofelements included in the semiconductor device.

According to the embodiment, regardless of the heights of the voltagesV1 and V2 to be applied to the sources of the switch elements Q1 and Q2,the upper limit values of the gate-source voltages of the switchelements Q1 and Q2 can be suppressed to a range lower than the ratingvoltages RVGS1 and RVGS2 of the switch elements. Thus, the semiconductordevice 1 can suppress the destruction of the switch elements Q1 and Q2even without a means such as dividing the voltages to be compared. Thus,the increase in elements such as resistors can be suppressed.Accordingly, it is possible to suppress an increase in chip size whilesuppressing an increase in power consumption of the semiconductor device1.

In addition, in a case where an element such as a resistor for dividinga voltage to be applied to the gate or source of a switch element isincluded, a semiconductor device includes, for example, a resistorhaving a large resistance value in order to suppress an increase incurrent consumption. However, in general, the size of a resistorincreases along with an increase in resistance value, leading to anincrease in chip size. Thus, suppression of the increase in currentconsumption and suppression of the increase in chip size would be in atrade-off relationship. According to the embodiment, the increase inresistors can be suppressed. Thus, it is possible to suppress theincrease in chip size while suppressing the increase in currentconsumption that depends on the size of a resistor.

Further, in the case where a resistor for dividing a voltage to beapplied to the gate or source of a switch element is included, due totemperature characteristics of the resistor, there is a possibility thatcurrent consumption of a semiconductor device may increase depending onthe temperature. According to the embodiment, it is possible to suppressthe increase in resistors, and it is thus possible to suppress atemperature-dependent increase in current consumption.

In addition, according to the embodiment, the semiconductor device 1includes the diode D1 including the anode coupled to the drain and gateof the switch element Q1 and the cathode coupled to the node N3, and thediode D2 including the anode coupled to the drain and gate of the switchelement Q2 and the cathode coupled to the node N3. That is, an electriccurrent flows in a direction from the switch element Q1 to the node N3via the diode D1 between the switch element Q1 and the node N3. Betweenthe switch element Q2 and the node N3, an electric current flows in adirection from the switch element Q2 side to the node N3 via the diodeD2. Therefore, it is possible to suppress a reverse flow of the electriccurrent from the node N3 to the voltage source of the voltage V1, and areverse flow of the electric current from the node N3 to a voltagesource of the voltage V2.

Supplementarily, in a P-channel type switch element, a body diode ispresent between the drain and source. The anode of the body diode iscoupled to the drain of the corresponding switch element. The cathode ofthe body diode is coupled to the source of the corresponding switchelement. Thereby, in a case where an electric current is supplied to thedrain side of the switch element, there is a possibility that theelectric current may flow (flow back) from the drain side to the sourceside of the switch element via the body diode of the switch element.According to the embodiment, the diodes D1 and D2 can suppress a currentsupply from the node N3 to the drain of the switch element Q1 and acurrent supply from the node N3 to the drain of the switch element Q2,respectively. Therefore, it is possible to suppress a reverse flow of anelectric current via a body diode of the switch element Q1 and a reverseflow of an electric current via a body diode of the switch element Q2.

2. Modifications

The above-described embodiment can be modified in various ways.

Semiconductor devices according to modifications will be describedbelow. In the following, descriptions will be given of configurationsand operations of the semiconductor devices according to themodifications, focusing on points different from the semiconductordevice according to the embodiment. The semiconductor devices accordingto the modifications can also exhibit the same effects as that of theembodiment.

2.1 First Modification

In the above-described embodiment, an example has been described inwhich the diodes D1 and D2 are provided to suppress the reverse flow ofthe electric current via the switch element Q1 and the reverse flow ofthe electric current via the switch element Q2, but the presentinvention is not limited thereto. For example, the reverse flow of theelectric current to the voltage source of the voltage V1 and the voltagesource of the voltage V2 may be suppressed with a configurationincluding switch elements instead of the diodes D1 and D2.

A configuration of the semiconductor device 1 according to the firstmodification will be described with reference to FIG. 2 . FIG. 2 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the first modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the first modification is the same as that of theembodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the first modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The comparing part 11 according to the first modification includesswitch elements Q7, Q8, and Q9. The switch elements Q7, Q8, and Q9 areP-channel type MOSFETs.

The drain of the switch element Q1 is coupled to the switch element Q7.The gate of the switch element Q1 is coupled to the node N3.

The drain of the switch element Q2 is coupled to the switch element Q8.The gate of the switch element Q2 is coupled to the node N3.

The gate of the switch element Q4 is coupled to the node N3. The drainof the switch element Q4 is coupled to the switch element Q9.

The drain of the switch element Q7 is coupled to the drain of the switchelement Q1. The source and gate of the switch element Q7 are coupled tothe node N3.

The drain of the switch element Q8 is coupled to the drain of the switchelement Q2. The source and gate of the switch element Q8 are coupled tothe node N3.

The drain of the switch element Q9 is coupled to the drain of the switchelement Q4. The source of the switch element Q9 is coupled to the nodeN5. The gate of the switch element Q9 is coupled to the node N3.

The rest of the configuration is substantially the same as theconfiguration of the comparing part 11 according to the embodiment,except that the diodes D1 and D2 are not included.

Since the operation according to the first modification is substantiallythe same as that according to the embodiment, descriptions thereof willbe omitted.

According to the first modification, the switch element Q7 is arrangedin such a manner that an orientation of a body diode of the switchelement Q7 is different from that of the body diode of the switchelement Q1 on a current path between the terminal PV1 and the node N3.In addition, the switch element Q8 is arranged in such a manner that anorientation of a body diode of the switch element Q8 is opposed to anorientation of the body diode of the switch element Q2 on a current pathbetween the terminal PV2 and the node N3. Further, the switch element Q9is arranged in such a manner that an orientation of a body diode of theswitch element Q9 is different from that of a body diode of the switchelement Q4 on a current path between the terminal PV2 and the node N5.With such a configuration as well, it is possible to suppress thereverse flow of the electric current to the voltage source of thevoltage V1 or the voltage source of the voltage V2, as in theembodiment.

Further, according to the first modification, it is possible to suppressa voltage drop due to a forward voltage of a diode. Thereby, forexample, it is possible to suppress a drop in voltage of the node N3 andincrease the constant current IS as compared with the case in which thediode is included. Therefore, it is possible to suppress a decrease inreliability of the comparing part 11.

2.2 Second Modification

In the first modification, a case has been described in which the drainof the switch element Q1, the drain of the switch element Q2, and thedrain of the switch element Q4 are respectively coupled to the drains ofthe corresponding switch elements, but the present invention is notlimited thereto. The comparing part 11 may be formed in such a mannerthat the source of the switch element Q1, the source of the switchelement Q2, and the source of the switch element Q4 are respectivelycoupled to the sources of the corresponding switch elements.

A configuration of the semiconductor device 1 according to a secondmodification will be described with reference to FIG. 3 . FIG. 3 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the second modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the second modification is the same as that of theembodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the second modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The comparing part 11 according to the second modification includesswitch elements Q10, Q11, and Q12. The switch elements Q10, Q11, and Q12are P-channel type MOSFETs.

The source of the switch element Q1 is coupled to the switch elementQ10. The gate and drain of the switch element Q1 are coupled to the nodeN3.

The source of the switch element Q2 is coupled to the switch elementQ11. The gate and drain of the switch element Q2 are coupled to the nodeN3.

The source of the switch element Q4 is coupled to the switch elementQ12. The gate of the switch element Q4 is coupled to the node N3. Thedrain of the switch element Q4 is coupled to the node N5.

The source of the switch element Q10 is coupled to the source of theswitch element Q1. The drain of the switch element Q10 is coupled to theterminal PV1. The gate of the switch element Q10 is coupled to the nodeN3.

The source of the switch element Q11 is coupled to the source of theswitch element Q2. The drain of the switch element Q11 is coupled to theterminal PV2. The gate of the switch element Q11 is coupled to the nodeN3.

The source of the switch element Q12 is coupled to the source of theswitch element Q4. The drain of the switch element Q12 is coupled to theterminal PV2. The gate of the switch element Q12 is coupled to the nodeN3.

The rest of the configuration is substantially the same as theconfiguration of the comparing part 11 according to the embodiment,except that the diodes D1 and D2 are not included.

Since the operation according to the second modification issubstantially the same as that according to the embodiment and thataccording to the first modification, descriptions thereof will beomitted.

With such a configuration as well, it is possible to suppress thereverse flow of the electric current to the voltage source of thevoltage V1 or the voltage source of the voltage V2, as in the embodimentand the first modification. In addition, it is possible to suppress adecrease in reliability of the comparing part 11, as in the firstmodification.

2.3 Third Modification

In the above-described embodiment, a case has been described in whichthe gate and drain of the switch element Q2 and the gate of the switchelement Q4 are equipotential, but the present invention is not limitedthereto. The comparing part 11 may include a configuration ofcontrolling the drain of the switch element Q4, in addition to the gateof the switch element Q4, to be equipotential to the gate and drain ofthe switch element Q2.

A configuration of the semiconductor device 1 according to a thirdmodification will be described with reference to FIG. 4 . FIG. 4 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the third modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the third modification is the same as that of theembodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the third modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The comparing part 11 according to the third modification includes anoperational amplifier AMP and a switch element Q13. The switch elementQ13 is a P-channel type MOSFET.

An inverting input terminal (−) of the operational amplifier AMP iscoupled to a node N6. The node N6 is coupled to the drain of the switchelement Q4. A non-inverting input terminal (+) of the operationalamplifier AMP is coupled to the node N4. An output terminal of theoperational amplifier AMP is coupled to the switch element Q13.

The source of the switch element Q13 is coupled to the inverting inputterminal (−) of the operational amplifier AMP or the node N6. The drainof the switch element Q13 is coupled to the node N5. The gate of theswitch element Q13 is coupled to the output terminal of the operationalamplifier AMP.

In the above-described configuration, the operational amplifier AMPcontrols an output of a voltage from the output terminal of theoperational amplifier AMP (controls a state (an on state and an offstate) of the switch element Q13) based on a voltage of the node N4 tobe applied to the non-inverting input terminal (+) and a voltage of thenode N6 to be applied to the inverting input terminal (−). Thereby, theoperational amplifier AMP controls the voltage of the node N4 and thevoltage of the node N6 to be equal.

The rest of the configuration is substantially the same as theconfiguration of the comparing part 11 according to the embodiment.

Since the operation according to the third modification is substantiallythe same as that according to the embodiment, descriptions thereof willbe omitted.

According to the third modification, the operational amplifier AMPcontrols the voltage of the node N4 and the voltage of the node N6 to beequal. That is, the voltage of the drain of the switch element Q2 andthe voltage of the drain of the switch element Q4 can be made equal.Thereby, in the current mirror circuit formed of the switch elements Q2and Q4, the comparing part 11 can suppress an increase in errors in theelectric currents I2 and IM. Thus, it is possible to suppress the outputof an erroneous signal S.

2.4 Fourth Modification

In the above-described embodiment, a case in which the comparing part 11includes the resistor R1 as a load has been described, but the presentinvention is not limited thereto. The comparing part 11 may include adiode instead of the resistor R1 as a load.

A configuration of the semiconductor device 1 according to a fourthmodification will be described with reference to FIG. 5 . FIG. 5 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the fourth modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the fourth modification is the same as that of theembodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the fourth modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The comparing part 11 according to the fourth modification includes adiode D3.

The anode of the diode D3 is coupled to the node N5. The cathode of thediode D3 is grounded.

The rest of the configuration is substantially the same as theconfiguration of the comparing part 11 according to the embodiment,except that the resistor R1 is not included.

Since the operation according to the fourth modification issubstantially the same as that according to the embodiment, descriptionsthereof will be omitted.

With such a configuration as well, the same effects as those of theembodiment, first modification, second modification, and thirdmodification can be exhibited.

2.5 Fifth Modification

In the above-described embodiment, first modification, secondmodification, third modification, and fourth modification, which signalS to be output from the terminal POUT is determined according to thestate of the switch element Q6. However, the present invention is notlimited thereto. The signal S to be output from the terminal POUT may bedetermined based on a state of the switch element Q5 in addition to thestate of the switch element Q6.

A configuration of the semiconductor device 1 according to a fifthmodification will be described with reference to FIG. 6 . FIG. 6 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the fifth modification. In thefollowing, descriptions will be given of the configuration of thesemiconductor device 1 according to the fifth modification, focusing onpoints different from the configuration of the semiconductor device 1according to the embodiment.

The gate of the switch element Q5 of the comparing part 11 according tothe fifth modification is coupled to the node N5 instead of the currentsource 10. An absolute value of a threshold voltage of the switchelement Q5 is equivalent to an absolute value of a difference betweenthe voltage of the node N5 in the case where the electric current IM isa half of the constant current IS, and the voltage VDD. That is, in thecase where the electric current IM is smaller than a half of theconstant current IS, the switch element Q5 is turned on. In addition, inthe case where the electric current IM is equal to or larger than a halfof the constant current IS, the switch element Q5 is turned off.

The rest of the configuration is substantially the same as theconfiguration of the comparing part 11 according to the embodiment.

Next, the operation of the semiconductor device 1 according to the fifthmodification will be described.

In the semiconductor device 1 according to the fifth modification, forexample, in a case where the voltage V1 is higher than the voltage V2(the electric current IM is smaller than a half of the constant currentIS), the switch element Q5 is turned on, and the switch element Q6 isturned off. Thus, the voltage VDD is supplied to the terminal POUT viathe switch element Q5, and an “H”-level signal S is output from theterminal POUT. In addition, in a case where the voltage V1 is equal toor lower than the voltage V2 (the electric current IM is equal to orlarger than a half of the constant current IS), the switch element Q5 isturned off, and the switch element Q6 is turned on. Thus, the terminalPOUT is grounded via the switch element Q6, and an “L”-level signal S isoutput from the terminal POUT.

The other operations are the same as those according to the embodiment.

With such a configuration as well, the same effects as those of theembodiment, first modification, second modification, third modification,and fourth modification can be exhibited.

2.6 Sixth Modification

In the above-described embodiment, first modification, secondmodification, third modification, fourth modification, and fifthmodification, a case in which the heights of the voltages V1 and V2 arecompared has been described, but the present invention is not limitedthereto. The semiconductor device 1 may be formed, for example, tocompare the heights of the voltages VDD and V2. That is, thesemiconductor device determines the height of the voltage V2 based onthe voltage VDD.

A configuration of a semiconductor device 1 according to a sixthmodification will be described with reference to FIG. 7 . FIG. 7 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the sixth modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the sixth modification is the same as that of theembodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the sixth modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The source of the switch element Q1 of the comparing part 11 accordingto the sixth modification is coupled, together with the source of theswitch element Q5, to the terminal PVDD of the current source 10.Thereby, the voltage VDD is applied to the source of the switch elementQ1, instead of the voltage V1 in the embodiment.

Since the rest of the configuration is substantially the same as that ofthe comparing part 11 according to the embodiment, descriptions thereofwill be omitted.

Next, the operation of the semiconductor device 1 according to the sixthmodification will be described.

In the operation of the semiconductor device 1 according to the sixthmodification, the voltage VDD and the voltage V2 are compared. The otheroperations are substantially the same as those according to theembodiment.

Thus, in a case where the voltage V2 is lower than the voltage VDD, an“H”-level signal S is output from the terminal POUT. In addition, in acase where the voltage V2 is equal to or higher than the voltage VDD, an“L”-level signal S is output from the terminal POUT.

With such a configuration as well, the same effects as those of theembodiment, first modification, second modification, third modification,fourth modification, and fifth modification can be exhibited.

2.7 Seventh Modification

In the sixth modification, a case in which the semiconductor device 1compares the heights of the voltages VDD and V2 has been described, butthe present invention is not limited thereto. The semiconductor device 1may be formed so as to compare the heights of the voltages V1 and VDD.That is, the semiconductor device determines the height of the voltageV1 based on the voltage VDD.

A configuration of a semiconductor device 1 according to a seventhmodification will be described with reference to FIG. 8 . FIG. 8 is acircuit diagram explaining an example of the configuration of thesemiconductor device 1 according to the seventh modification. Note thatsince a configuration of the current source 10 of the semiconductordevice 1 according to the seventh modification is the same as that ofthe embodiment, descriptions thereof will be omitted. In the following,descriptions will be given of a configuration of the comparing part 11according to the seventh modification, focusing on points different fromthe configuration of the comparing part 11 according to the embodiment.

The source of the switch element Q2 of the comparing part 11 accordingto the seventh modification is coupled to the terminal PVDD of thecurrent source 10. Thereby, the voltage VDD is applied to the source ofthe switch element Q2, instead of the voltage V2 in the embodiment.

Since the rest of the configuration is substantially the same as that ofthe comparing part 11 according to the embodiment, descriptions thereofwill be omitted.

Next, the operation of the semiconductor device 1 according to theseventh modification will be described.

In the operation of the semiconductor device 1 according to the seventhmodification, the voltage V1 and the voltage VDD are compared. The otheroperations are substantially the same as those according to theembodiment.

Thereby, in a case where the voltage V1 is higher than the voltage VDD,an “H”-level signal S is output from the terminal POUT. In addition, ina case where the voltage V1 is equal to or lower than the voltage VDD,an “L”-level signal S is output from the terminal POUT.

With such a configuration as well, the same effects as those of theembodiment, first modification, second modification, third modification,fourth modification, fifth modification, and sixth modification can beexhibited.

3. Others

Note that in the above-described embodiment and first to seventhmodifications, a case in which current-voltage characteristics, gatelengths, and channel widths of the switch elements Q1, Q2, and Q4 areequivalent to one another has been described as an example, but thepresent invention is not limited thereto. The current-voltagecharacteristics, gate length, and channel width of the switch element Q4may be different from those of each of the switch elements Q1 and Q2. Inthis case, the electric current IM flowing through the switch element Q4is a multiple (excluding a multiple of 1×; i.e., excluding equivalence)of the electric current I2 flowing through the switch element Q2.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

1. A semiconductor device comprising: a first switch element including afirst end to which a first voltage is applied, and a second end and agate electrically coupled to a first node; a second switch elementincluding a first end to which a second voltage is applied, and a secondend and a gate electrically coupled to the first node; a third switchelement including a first end to which the second voltage is applied, asecond end electrically coupled to a second node, and a gate coupled tothe first node; a first current source electrically coupled to the firstnode; a first element electrically coupled to the second node; a fourthswitch element including a gate coupled to the second node; and a firstterminal electrically coupled to a first end of the fourth switchelement and outputting a signal based on a voltage of the second node,wherein the first element is a first resistor including a first endcoupled to the second node.
 2. The device of claim 1, furthercomprising: a first diode provided between the first switch element andthe first node, and including an anode coupled to the second end and thegate of the first switch element and a cathode coupled to the firstnode; and a second diode provided between the second switch element andthe first node, and including an anode coupled to the second end and thegate of the second switch element and the gate of the third switchelement and a cathode coupled to the first node.
 3. The device of claim1, wherein the first end of the first switch element is a source, andthe second end of the first switch element is a drain, the first end ofthe second switch element is a source, and the second end of the secondswitch element is a drain, and the first end of the third switch elementis a source, and the second end of the third switch element is a drain.4. The device of claim 3, further comprising: a fifth switch elementprovided between the first switch element and the first node, andincluding a drain coupled to the drain of the first switch element and asource and a gate coupled to the first node together with the gate ofthe first switch element; a sixth switch element provided between thesecond switch element and the first node, and including a drain coupledto the drain of the second switch element and a source and a gatecoupled to the first node together with the gate of the second switchelement; and a seventh switch element provided between the third switchelement and the second node, and including a drain coupled to the drainof the third switch element, a gate coupled to the first node togetherwith the gate of the third switch element, and a source coupled to thesecond node.
 5. The device of claim 3, further comprising: an eighthswitch element including a source coupled to the source of the firstswitch element, a gate coupled to the first node together with the gateof the first switch element, and a drain to which the first voltage isapplied; a ninth switch element including a source coupled to the sourceof the second switch element, a gate coupled to the first node togetherwith the gate of the second switch element, and a drain to which thesecond voltage is applied; and a tenth switch element including a sourcecoupled to the source of the third switch element, a gate coupled to thefirst node together with the gate of the third switch element, and adrain to which the second voltage is applied.
 6. The device of claim 1,further comprising: an eleventh switch element including a first endcoupled to the second end of the third switch element, a gate, and asecond end coupled to the second node; and an operational amplifierincluding an inverting input terminal coupled to the second end of thethird switch element and the first end of the eleventh switch element, anon-inverting input terminal coupled to the first node, and an outputterminal coupled to the gate of the eleventh switch element.
 7. Thedevice of claim 1, further comprising a twelfth switch element includinga first end, a gate, and a second end coupled to the first terminal. 8.The device of claim 7, wherein the gate of the twelfth switch element iscoupled to the second node.
 9. The device of claim 7, wherein the firstend of the first switch element or the first end of the second switchelement is coupled to the first end of the twelfth switch element. 10.The device of claim 1, wherein the first end of the fourth switchelement is a drain, and the second end of the fourth switch element is asource.
 11. The device of claim 7, wherein the first end of the twelfthswitch element is a source, and the second end of the twelfth switchelement is a drain.
 12. The device of claim 1, wherein the first currentsource is a thirteenth switch element including a first end coupled tothe first node.
 13. The device of claim 12, wherein the first end of thethirteenth switch element is a drain, and a second end of the thirteenthswitch element is a source.
 14. (canceled)
 15. (canceled)
 16. Asemiconductor device comprising: a first switch element including afirst end to which a first voltage is applied, and a second end and agate electrically coupled to a first node; a second switch elementincluding a first end to which a second voltage is applied, and a secondend and a gate electrically coupled to the first node; a third switchelement including a first end to which the second voltage is applied, asecond end electrically coupled to a second node, and a gate coupled tothe first node; a first current source electrically coupled to the firstnode; a first element electrically coupled to the second node; a fourthswitch element including a gate coupled to the second node; and a firstterminal electrically coupled to a first end of the fourth switchelement and outputting a signal based on a voltage of the second node,wherein the first element is a third diode including an anode coupled tothe second node.
 17. The device of claim 16, further comprising: a firstdiode provided between the first switch element and the first node, andincluding an anode coupled to the second end and the gate of the firstswitch element and a cathode coupled to the first node; and a seconddiode provided between the second switch element and the first node, andincluding an anode coupled to the second end and the gate of the secondswitch element and the gate of the third switch element and a cathodecoupled to the first node.
 18. The device of claim 16, wherein the firstend of the first switch element is a source, and the second end of thefirst switch element is a drain, the first end of the second switchelement is a source, and the second end of the second switch element isa drain, and the first end of the third switch element is a source, andthe second end of the third switch element is a drain.
 19. The device ofclaim 18, further comprising: a fifth switch element provided betweenthe first switch element and the first node, and including a draincoupled to the drain of the first switch element and a source and a gatecoupled to the first node together with the gate of the first switchelement; a sixth switch element provided between the second switchelement and the first node, and including a drain coupled to the drainof the second switch element and a source and a gate coupled to thefirst node together with the gate of the second switch element; and aseventh switch element provided between the third switch element and thesecond node, and including a drain coupled to the drain of the thirdswitch element, a gate coupled to the first node together with the gateof the third switch element, and a source coupled to the second node.20. The device of claim 18, further comprising: an eighth switch elementincluding a source coupled to the source of the first switch element, agate coupled to the first node together with the gate of the firstswitch element, and a drain to which the first voltage is applied; aninth switch element including a source coupled to the source of thesecond switch element, a gate coupled to the first node together withthe gate of the second switch element, and a drain to which the secondvoltage is applied; and a tenth switch element including a sourcecoupled to the source of the third switch element, a gate coupled to thefirst node together with the gate of the third switch element, and adrain to which the second voltage is applied.
 21. The device of claim16, further comprising: an eleventh switch element including a first endcoupled to the second end of the third switch element, a gate, and asecond end coupled to the second node; and an operational amplifierincluding an inverting input terminal coupled to the second end of thethird switch element and the first end of the eleventh switch element, anon-inverting input terminal coupled to the first node, and an outputterminal coupled to the gate of the eleventh switch element.
 22. Thedevice of claim 16, further comprising a twelfth switch elementincluding a first end, a gate, and a second end coupled to the firstterminal.
 23. The device of claim 22, wherein the gate of the twelfthswitch element is coupled to the second node.
 24. The device of claim22, wherein the first end of the first switch element or the first endof the second switch element is coupled to the first end of the twelfthswitch element.
 25. The device of claim 16, wherein the first end of thefourth switch element is a drain, and the second end of the fourthswitch element is a source.
 26. The device of claim 22, wherein thefirst end of the twelfth switch element is a source, and the second endof the twelfth switch element is a drain.
 27. The device of claim 16,wherein the first current source is a thirteenth switch elementincluding a first end coupled to the first node.
 28. The device of claim27, wherein the first end of the thirteenth switch element is a drain,and a second end of the thirteenth switch element is a source.